<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - code analysis - /usr/include/boost/algorithm/string/trim.hpp</title>
  <link rel="stylesheet" type="text/css" href="../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../../../../index.html">top level</a> - <a href="index.html">usr/include/boost/algorithm/string</a> - trim.hpp<span style="font-size: 80%;"> (source / <a href="trim.hpp.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">code analysis</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">13</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2020-09-11 22:25:26</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">4</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Legend:</td>
            <td class="headerValueLeg">            Lines:
            <span class="coverLegendCov">hit</span>
            <span class="coverLegendNoCov">not hit</span>
</td>
            <td></td>
          </tr>
          <tr><td><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : //  Boost string_algo library trim.hpp header file  ---------------------------//</a>
<span class="lineNum">       2 </span>            : 
<span class="lineNum">       3 </span>            : //  Copyright Pavol Droba 2002-2003.
<span class="lineNum">       4 </span>            : //
<span class="lineNum">       5 </span>            : // Distributed under the Boost Software License, Version 1.0.
<span class="lineNum">       6 </span>            : //    (See accompanying file LICENSE_1_0.txt or copy at
<span class="lineNum">       7 </span>            : //          http://www.boost.org/LICENSE_1_0.txt)
<span class="lineNum">       8 </span>            : 
<span class="lineNum">       9 </span>            : //  See http://www.boost.org/ for updates, documentation, and revision history.
<span class="lineNum">      10 </span>            : 
<span class="lineNum">      11 </span>            : #ifndef BOOST_STRING_TRIM_HPP
<span class="lineNum">      12 </span>            : #define BOOST_STRING_TRIM_HPP
<span class="lineNum">      13 </span>            : 
<span class="lineNum">      14 </span>            : #include &lt;boost/algorithm/string/config.hpp&gt;
<span class="lineNum">      15 </span>            : 
<span class="lineNum">      16 </span>            : #include &lt;boost/range/begin.hpp&gt;
<span class="lineNum">      17 </span>            : #include &lt;boost/range/end.hpp&gt;
<span class="lineNum">      18 </span>            : #include &lt;boost/range/const_iterator.hpp&gt;
<span class="lineNum">      19 </span>            : #include &lt;boost/range/as_literal.hpp&gt;
<span class="lineNum">      20 </span>            : #include &lt;boost/range/iterator_range_core.hpp&gt;
<span class="lineNum">      21 </span>            : 
<span class="lineNum">      22 </span>            : #include &lt;boost/algorithm/string/detail/trim.hpp&gt;
<span class="lineNum">      23 </span>            : #include &lt;boost/algorithm/string/classification.hpp&gt;
<span class="lineNum">      24 </span>            : #include &lt;locale&gt;
<span class="lineNum">      25 </span>            : 
<span class="lineNum">      26 </span>            : /*! \file
<span class="lineNum">      27 </span>            :     Defines trim algorithms.
<span class="lineNum">      28 </span>            :     Trim algorithms are used to remove trailing and leading spaces from a 
<span class="lineNum">      29 </span>            :     sequence (string). Space is recognized using given locales.
<span class="lineNum">      30 </span>            : 
<span class="lineNum">      31 </span>            :     Parametric (\c _if) variants use a predicate (functor) to select which characters
<span class="lineNum">      32 </span>            :     are to be trimmed.. 
<span class="lineNum">      33 </span>            :     Functions take a selection predicate as a parameter, which is used to determine 
<span class="lineNum">      34 </span>            :     whether a character is a space. Common predicates are provided in classification.hpp header.
<span class="lineNum">      35 </span>            : 
<span class="lineNum">      36 </span>            : */
<span class="lineNum">      37 </span>            : 
<span class="lineNum">      38 </span>            : namespace boost {
<span class="lineNum">      39 </span>            :     namespace algorithm {
<span class="lineNum">      40 </span>            : 
<span class="lineNum">      41 </span>            :     //  left trim  -----------------------------------------------//
<span class="lineNum">      42 </span>            : 
<span class="lineNum">      43 </span>            : 
<span class="lineNum">      44 </span>            :         //! Left trim - parametric
<span class="lineNum">      45 </span>            :         /*!
<span class="lineNum">      46 </span>            :             Remove all leading spaces from the input. 
<span class="lineNum">      47 </span>            :             The supplied predicate is used to determine which characters are considered spaces.
<span class="lineNum">      48 </span>            :             The result is a trimmed copy of the input. It is returned as a sequence 
<span class="lineNum">      49 </span>            :             or copied to the output iterator
<span class="lineNum">      50 </span>            : 
<span class="lineNum">      51 </span>            :             \param Output An output iterator to which the result will be copied
<span class="lineNum">      52 </span>            :             \param Input An input range
<span class="lineNum">      53 </span>            :             \param IsSpace A unary predicate identifying spaces
<span class="lineNum">      54 </span>            :             \return 
<span class="lineNum">      55 </span>            :                 An output iterator pointing just after the last inserted character or
<span class="lineNum">      56 </span>            :                 a copy of the input
<span class="lineNum">      57 </span>            : 
<span class="lineNum">      58 </span>            :                \note The second variant of this function provides the strong exception-safety guarantee
<span class="lineNum">      59 </span>            :         */
<span class="lineNum">      60 </span>            :         template&lt;typename OutputIteratorT, typename RangeT, typename PredicateT&gt;
<span class="lineNum">      61 </span>            :         inline OutputIteratorT trim_left_copy_if( 
<span class="lineNum">      62 </span>            :             OutputIteratorT Output,
<span class="lineNum">      63 </span>            :             const RangeT&amp; Input,
<span class="lineNum">      64 </span>            :             PredicateT IsSpace)
<span class="lineNum">      65 </span>            :         {
<span class="lineNum">      66 </span>            :             iterator_range&lt;BOOST_STRING_TYPENAME range_const_iterator&lt;RangeT&gt;::type&gt; lit_range(::boost::as_literal(Input));
<span class="lineNum">      67 </span>            : 
<span class="lineNum">      68 </span>            :             std::copy( 
<span class="lineNum">      69 </span>            :                 ::boost::algorithm::detail::trim_begin( 
<span class="lineNum">      70 </span>            :                     ::boost::begin(lit_range), 
<span class="lineNum">      71 </span>            :                     ::boost::end(lit_range), 
<span class="lineNum">      72 </span>            :                     IsSpace ),
<span class="lineNum">      73 </span>            :                 ::boost::end(lit_range),
<span class="lineNum">      74 </span>            :                 Output);
<span class="lineNum">      75 </span>            : 
<span class="lineNum">      76 </span>            :             return Output;
<span class="lineNum">      77 </span>            :         }
<span class="lineNum">      78 </span>            : 
<span class="lineNum">      79 </span>            :         //! Left trim - parametric
<span class="lineNum">      80 </span>            :         /*!
<span class="lineNum">      81 </span>            :             \overload
<span class="lineNum">      82 </span>            :         */
<span class="lineNum">      83 </span>            :         template&lt;typename SequenceT, typename PredicateT&gt;
<span class="lineNum">      84 </span>            :         inline SequenceT trim_left_copy_if(const SequenceT&amp; Input, PredicateT IsSpace)
<span class="lineNum">      85 </span>            :         {
<span class="lineNum">      86 </span>            :             return SequenceT( 
<span class="lineNum">      87 </span>            :                 ::boost::algorithm::detail::trim_begin( 
<span class="lineNum">      88 </span>            :                     ::boost::begin(Input), 
<span class="lineNum">      89 </span>            :                     ::boost::end(Input), 
<span class="lineNum">      90 </span>            :                     IsSpace ),
<span class="lineNum">      91 </span>            :                 ::boost::end(Input));
<span class="lineNum">      92 </span>            :         }
<span class="lineNum">      93 </span>            : 
<span class="lineNum">      94 </span>            :         //! Left trim - parametric
<span class="lineNum">      95 </span>            :         /*!
<span class="lineNum">      96 </span>            :             Remove all leading spaces from the input. 
<span class="lineNum">      97 </span>            :             The result is a trimmed copy of the input.
<span class="lineNum">      98 </span>            : 
<span class="lineNum">      99 </span>            :             \param Input An input sequence
<span class="lineNum">     100 </span>            :             \param Loc a locale used for 'space' classification
<span class="lineNum">     101 </span>            :             \return A trimmed copy of the input
<span class="lineNum">     102 </span>            : 
<span class="lineNum">     103 </span>            :             \note This function provides the strong exception-safety guarantee
<span class="lineNum">     104 </span>            :         */
<span class="lineNum">     105 </span>            :         template&lt;typename SequenceT&gt;
<span class="lineNum">     106 </span>            :         inline SequenceT trim_left_copy(const SequenceT&amp; Input, const std::locale&amp; Loc=std::locale())
<span class="lineNum">     107 </span>            :         {
<span class="lineNum">     108 </span>            :             return            
<span class="lineNum">     109 </span>            :                 ::boost::algorithm::trim_left_copy_if(
<span class="lineNum">     110 </span>            :                     Input, 
<span class="lineNum">     111 </span>            :                     is_space(Loc));
<span class="lineNum">     112 </span>            :         }
<span class="lineNum">     113 </span>            : 
<span class="lineNum">     114 </span>            :         //! Left trim
<span class="lineNum">     115 </span>            :         /*!
<span class="lineNum">     116 </span>            :             Remove all leading spaces from the input. The supplied predicate is 
<span class="lineNum">     117 </span>            :             used to determine which characters are considered spaces.
<span class="lineNum">     118 </span>            :             The input sequence is modified in-place.
<span class="lineNum">     119 </span>            : 
<span class="lineNum">     120 </span>            :             \param Input An input sequence
<span class="lineNum">     121 </span>            :             \param IsSpace A unary predicate identifying spaces
<a name="122"><span class="lineNum">     122 </span>            :         */</a>
<span class="lineNum">     123 </span>            :         template&lt;typename SequenceT, typename PredicateT&gt;
<span class="lineNum">     124 </span><span class="lineNoCov">          0 :         inline void trim_left_if(SequenceT&amp; Input, PredicateT IsSpace)</span>
<span class="lineNum">     125 </span>            :         {
<span class="lineNum">     126 </span><span class="lineNoCov">          0 :             Input.erase( </span>
<span class="lineNum">     127 </span>            :                 ::boost::begin(Input),
<span class="lineNum">     128 </span>            :                 ::boost::algorithm::detail::trim_begin( 
<span class="lineNum">     129 </span>            :                     ::boost::begin(Input), 
<span class="lineNum">     130 </span>            :                     ::boost::end(Input), 
<span class="lineNum">     131 </span>            :                     IsSpace));
<span class="lineNum">     132 </span><span class="lineNoCov">          0 :         }</span>
<span class="lineNum">     133 </span>            : 
<span class="lineNum">     134 </span>            :         //! Left trim
<span class="lineNum">     135 </span>            :         /*!
<span class="lineNum">     136 </span>            :             Remove all leading spaces from the input.
<span class="lineNum">     137 </span>            :             The Input sequence is modified in-place.
<span class="lineNum">     138 </span>            : 
<span class="lineNum">     139 </span>            :             \param Input An input sequence
<span class="lineNum">     140 </span>            :             \param Loc A locale used for 'space' classification
<span class="lineNum">     141 </span>            :         */
<span class="lineNum">     142 </span>            :         template&lt;typename SequenceT&gt;
<span class="lineNum">     143 </span>            :         inline void trim_left(SequenceT&amp; Input, const std::locale&amp; Loc=std::locale())
<span class="lineNum">     144 </span>            :         {
<span class="lineNum">     145 </span>            :             ::boost::algorithm::trim_left_if( 
<span class="lineNum">     146 </span>            :                 Input, 
<span class="lineNum">     147 </span>            :                 is_space(Loc));
<span class="lineNum">     148 </span>            :         }
<span class="lineNum">     149 </span>            : 
<span class="lineNum">     150 </span>            :     //  right trim  -----------------------------------------------//
<span class="lineNum">     151 </span>            : 
<span class="lineNum">     152 </span>            :         //! Right trim - parametric
<span class="lineNum">     153 </span>            :         /*!
<span class="lineNum">     154 </span>            :             Remove all trailing spaces from the input.             
<span class="lineNum">     155 </span>            :             The supplied predicate is used to determine which characters are considered spaces.
<span class="lineNum">     156 </span>            :             The result is a trimmed copy of the input. It is returned as a sequence 
<span class="lineNum">     157 </span>            :             or copied to the output iterator
<span class="lineNum">     158 </span>            : 
<span class="lineNum">     159 </span>            :             \param Output An output iterator to which the result will be copied
<span class="lineNum">     160 </span>            :             \param Input An input range
<span class="lineNum">     161 </span>            :             \param IsSpace A unary predicate identifying spaces
<span class="lineNum">     162 </span>            :             \return 
<span class="lineNum">     163 </span>            :                 An output iterator pointing just after the last inserted character or
<span class="lineNum">     164 </span>            :                 a copy of the input
<span class="lineNum">     165 </span>            : 
<span class="lineNum">     166 </span>            :              \note The second variant of this function provides the strong exception-safety guarantee
<span class="lineNum">     167 </span>            :         */
<span class="lineNum">     168 </span>            :         template&lt;typename OutputIteratorT, typename RangeT, typename PredicateT&gt;
<span class="lineNum">     169 </span>            :         inline OutputIteratorT trim_right_copy_if( 
<span class="lineNum">     170 </span>            :             OutputIteratorT Output,
<span class="lineNum">     171 </span>            :             const RangeT&amp; Input,
<span class="lineNum">     172 </span>            :             PredicateT IsSpace )
<span class="lineNum">     173 </span>            :         {
<span class="lineNum">     174 </span>            :             iterator_range&lt;BOOST_STRING_TYPENAME range_const_iterator&lt;RangeT&gt;::type&gt; lit_range(::boost::as_literal(Input));
<span class="lineNum">     175 </span>            :          
<span class="lineNum">     176 </span>            :             std::copy( 
<span class="lineNum">     177 </span>            :                 ::boost::begin(lit_range),
<span class="lineNum">     178 </span>            :                 ::boost::algorithm::detail::trim_end( 
<span class="lineNum">     179 </span>            :                     ::boost::begin(lit_range), 
<span class="lineNum">     180 </span>            :                     ::boost::end(lit_range), 
<span class="lineNum">     181 </span>            :                     IsSpace ),
<span class="lineNum">     182 </span>            :                 Output );
<span class="lineNum">     183 </span>            : 
<span class="lineNum">     184 </span>            :             return Output;
<span class="lineNum">     185 </span>            :         }
<span class="lineNum">     186 </span>            : 
<span class="lineNum">     187 </span>            :         //! Right trim - parametric
<span class="lineNum">     188 </span>            :         /*!
<span class="lineNum">     189 </span>            :             \overload
<span class="lineNum">     190 </span>            :          */
<span class="lineNum">     191 </span>            :         template&lt;typename SequenceT, typename PredicateT&gt;
<span class="lineNum">     192 </span>            :         inline SequenceT trim_right_copy_if(const SequenceT&amp; Input, PredicateT IsSpace)
<span class="lineNum">     193 </span>            :         {
<span class="lineNum">     194 </span>            :             return SequenceT( 
<span class="lineNum">     195 </span>            :                 ::boost::begin(Input),
<span class="lineNum">     196 </span>            :                 ::boost::algorithm::detail::trim_end( 
<span class="lineNum">     197 </span>            :                     ::boost::begin(Input), 
<span class="lineNum">     198 </span>            :                     ::boost::end(Input), 
<span class="lineNum">     199 </span>            :                     IsSpace)
<span class="lineNum">     200 </span>            :                 );
<span class="lineNum">     201 </span>            :         }
<span class="lineNum">     202 </span>            : 
<span class="lineNum">     203 </span>            :         //! Right trim
<span class="lineNum">     204 </span>            :         /*!
<span class="lineNum">     205 </span>            :             Remove all trailing spaces from the input. 
<span class="lineNum">     206 </span>            :             The result is a trimmed copy of the input
<span class="lineNum">     207 </span>            : 
<span class="lineNum">     208 </span>            :             \param Input An input sequence
<span class="lineNum">     209 </span>            :             \param Loc A locale used for 'space' classification
<span class="lineNum">     210 </span>            :             \return A trimmed copy of the input
<span class="lineNum">     211 </span>            : 
<span class="lineNum">     212 </span>            :             \note This function provides the strong exception-safety guarantee
<span class="lineNum">     213 </span>            :         */
<span class="lineNum">     214 </span>            :         template&lt;typename SequenceT&gt;
<span class="lineNum">     215 </span>            :         inline SequenceT trim_right_copy(const SequenceT&amp; Input, const std::locale&amp; Loc=std::locale())
<span class="lineNum">     216 </span>            :         {
<span class="lineNum">     217 </span>            :             return 
<span class="lineNum">     218 </span>            :                 ::boost::algorithm::trim_right_copy_if( 
<span class="lineNum">     219 </span>            :                     Input, 
<span class="lineNum">     220 </span>            :                     is_space(Loc));
<span class="lineNum">     221 </span>            :         }
<span class="lineNum">     222 </span>            : 
<span class="lineNum">     223 </span>            :             
<span class="lineNum">     224 </span>            :         //! Right trim - parametric
<span class="lineNum">     225 </span>            :         /*!
<span class="lineNum">     226 </span>            :             Remove all trailing spaces from the input.
<span class="lineNum">     227 </span>            :             The supplied predicate is used to determine which characters are considered spaces.
<span class="lineNum">     228 </span>            :             The input sequence is modified in-place.
<span class="lineNum">     229 </span>            : 
<span class="lineNum">     230 </span>            :             \param Input An input sequence
<span class="lineNum">     231 </span>            :             \param IsSpace A unary predicate identifying spaces
<a name="232"><span class="lineNum">     232 </span>            :         */</a>
<span class="lineNum">     233 </span>            :         template&lt;typename SequenceT, typename PredicateT&gt;
<span class="lineNum">     234 </span><span class="lineNoCov">          0 :         inline void trim_right_if(SequenceT&amp; Input, PredicateT IsSpace)</span>
<span class="lineNum">     235 </span>            :         {
<span class="lineNum">     236 </span><span class="lineNoCov">          0 :             Input.erase(</span>
<span class="lineNum">     237 </span>            :                 ::boost::algorithm::detail::trim_end( 
<span class="lineNum">     238 </span>            :                     ::boost::begin(Input), 
<span class="lineNum">     239 </span>            :                     ::boost::end(Input), 
<span class="lineNum">     240 </span>            :                     IsSpace ),
<span class="lineNum">     241 </span>            :                 ::boost::end(Input)
<span class="lineNum">     242 </span>            :                 );
<span class="lineNum">     243 </span><span class="lineNoCov">          0 :         }</span>
<span class="lineNum">     244 </span>            : 
<span class="lineNum">     245 </span>            : 
<span class="lineNum">     246 </span>            :         //! Right trim
<span class="lineNum">     247 </span>            :         /*!
<span class="lineNum">     248 </span>            :             Remove all trailing spaces from the input. 
<span class="lineNum">     249 </span>            :             The input sequence is modified in-place.
<span class="lineNum">     250 </span>            : 
<span class="lineNum">     251 </span>            :             \param Input An input sequence
<span class="lineNum">     252 </span>            :             \param Loc A locale used for 'space' classification
<span class="lineNum">     253 </span>            :         */
<span class="lineNum">     254 </span>            :         template&lt;typename SequenceT&gt;
<span class="lineNum">     255 </span>            :         inline void trim_right(SequenceT&amp; Input, const std::locale&amp; Loc=std::locale())
<span class="lineNum">     256 </span>            :         {
<span class="lineNum">     257 </span>            :             ::boost::algorithm::trim_right_if(
<span class="lineNum">     258 </span>            :                 Input, 
<span class="lineNum">     259 </span>            :                 is_space(Loc) );
<span class="lineNum">     260 </span>            :         }
<span class="lineNum">     261 </span>            : 
<span class="lineNum">     262 </span>            :     //  both side trim  -----------------------------------------------//
<span class="lineNum">     263 </span>            : 
<span class="lineNum">     264 </span>            :         //! Trim - parametric
<span class="lineNum">     265 </span>            :         /*!
<span class="lineNum">     266 </span>            :             Remove all trailing and leading spaces from the input. 
<span class="lineNum">     267 </span>            :             The supplied predicate is used to determine which characters are considered spaces.
<span class="lineNum">     268 </span>            :             The result is a trimmed copy of the input. It is returned as a sequence 
<span class="lineNum">     269 </span>            :             or copied to the output iterator
<span class="lineNum">     270 </span>            : 
<span class="lineNum">     271 </span>            :             \param Output An output iterator to which the result will be copied
<span class="lineNum">     272 </span>            :             \param Input An input range
<span class="lineNum">     273 </span>            :             \param IsSpace A unary predicate identifying spaces
<span class="lineNum">     274 </span>            :             \return 
<span class="lineNum">     275 </span>            :                 An output iterator pointing just after the last inserted character or
<span class="lineNum">     276 </span>            :                 a copy of the input
<span class="lineNum">     277 </span>            : 
<span class="lineNum">     278 </span>            :              \note The second variant of this function provides the strong exception-safety guarantee
<span class="lineNum">     279 </span>            :         */
<span class="lineNum">     280 </span>            :         template&lt;typename OutputIteratorT, typename RangeT, typename PredicateT&gt;
<span class="lineNum">     281 </span>            :         inline OutputIteratorT trim_copy_if( 
<span class="lineNum">     282 </span>            :             OutputIteratorT Output,
<span class="lineNum">     283 </span>            :             const RangeT&amp; Input,
<span class="lineNum">     284 </span>            :             PredicateT IsSpace)
<span class="lineNum">     285 </span>            :         {
<span class="lineNum">     286 </span>            :             iterator_range&lt;BOOST_STRING_TYPENAME range_const_iterator&lt;RangeT&gt;::type&gt; lit_range(::boost::as_literal(Input));
<span class="lineNum">     287 </span>            : 
<span class="lineNum">     288 </span>            :             BOOST_STRING_TYPENAME 
<span class="lineNum">     289 </span>            :                 range_const_iterator&lt;RangeT&gt;::type TrimEnd=
<span class="lineNum">     290 </span>            :                 ::boost::algorithm::detail::trim_end( 
<span class="lineNum">     291 </span>            :                     ::boost::begin(lit_range), 
<span class="lineNum">     292 </span>            :                     ::boost::end(lit_range), 
<span class="lineNum">     293 </span>            :                     IsSpace);
<span class="lineNum">     294 </span>            : 
<span class="lineNum">     295 </span>            :             std::copy( 
<span class="lineNum">     296 </span>            :                 detail::trim_begin( 
<span class="lineNum">     297 </span>            :                     ::boost::begin(lit_range), TrimEnd, IsSpace),
<span class="lineNum">     298 </span>            :                 TrimEnd,
<span class="lineNum">     299 </span>            :                 Output
<span class="lineNum">     300 </span>            :                 );
<span class="lineNum">     301 </span>            : 
<span class="lineNum">     302 </span>            :             return Output;
<span class="lineNum">     303 </span>            :         }
<span class="lineNum">     304 </span>            : 
<span class="lineNum">     305 </span>            :         //! Trim - parametric
<span class="lineNum">     306 </span>            :         /*!
<span class="lineNum">     307 </span>            :             \overload
<span class="lineNum">     308 </span>            :          */
<span class="lineNum">     309 </span>            :         template&lt;typename SequenceT, typename PredicateT&gt;
<span class="lineNum">     310 </span>            :         inline SequenceT trim_copy_if(const SequenceT&amp; Input, PredicateT IsSpace)
<span class="lineNum">     311 </span>            :         {
<span class="lineNum">     312 </span>            :             BOOST_STRING_TYPENAME 
<span class="lineNum">     313 </span>            :                 range_const_iterator&lt;SequenceT&gt;::type TrimEnd=
<span class="lineNum">     314 </span>            :                     ::boost::algorithm::detail::trim_end( 
<span class="lineNum">     315 </span>            :                         ::boost::begin(Input), 
<span class="lineNum">     316 </span>            :                         ::boost::end(Input), 
<span class="lineNum">     317 </span>            :                         IsSpace);
<span class="lineNum">     318 </span>            : 
<span class="lineNum">     319 </span>            :             return SequenceT( 
<span class="lineNum">     320 </span>            :                 detail::trim_begin( 
<span class="lineNum">     321 </span>            :                     ::boost::begin(Input), 
<span class="lineNum">     322 </span>            :                     TrimEnd, 
<span class="lineNum">     323 </span>            :                     IsSpace),
<span class="lineNum">     324 </span>            :                 TrimEnd
<span class="lineNum">     325 </span>            :                 );
<span class="lineNum">     326 </span>            :         }
<span class="lineNum">     327 </span>            : 
<span class="lineNum">     328 </span>            :         //! Trim
<span class="lineNum">     329 </span>            :         /*!
<span class="lineNum">     330 </span>            :             Remove all leading and trailing spaces from the input. 
<span class="lineNum">     331 </span>            :             The result is a trimmed copy of the input
<span class="lineNum">     332 </span>            : 
<span class="lineNum">     333 </span>            :             \param Input An input sequence
<span class="lineNum">     334 </span>            :             \param Loc A locale used for 'space' classification
<span class="lineNum">     335 </span>            :             \return A trimmed copy of the input
<span class="lineNum">     336 </span>            : 
<span class="lineNum">     337 </span>            :             \note This function provides the strong exception-safety guarantee
<span class="lineNum">     338 </span>            :         */
<span class="lineNum">     339 </span>            :         template&lt;typename SequenceT&gt;
<span class="lineNum">     340 </span>            :         inline SequenceT trim_copy( const SequenceT&amp; Input, const std::locale&amp; Loc=std::locale() )
<span class="lineNum">     341 </span>            :         {
<span class="lineNum">     342 </span>            :             return
<span class="lineNum">     343 </span>            :                 ::boost::algorithm::trim_copy_if(
<span class="lineNum">     344 </span>            :                     Input, 
<span class="lineNum">     345 </span>            :                     is_space(Loc) );
<span class="lineNum">     346 </span>            :         }
<span class="lineNum">     347 </span>            :      
<span class="lineNum">     348 </span>            :         //! Trim
<span class="lineNum">     349 </span>            :         /*!
<span class="lineNum">     350 </span>            :             Remove all leading and trailing spaces from the input. 
<span class="lineNum">     351 </span>            :             The supplied predicate is used to determine which characters are considered spaces.
<span class="lineNum">     352 </span>            :             The input sequence is modified in-place.
<span class="lineNum">     353 </span>            : 
<span class="lineNum">     354 </span>            :             \param Input An input sequence
<span class="lineNum">     355 </span>            :             \param IsSpace A unary predicate identifying spaces
<a name="356"><span class="lineNum">     356 </span>            :         */</a>
<span class="lineNum">     357 </span>            :         template&lt;typename SequenceT, typename PredicateT&gt;
<span class="lineNum">     358 </span><span class="lineNoCov">          0 :         inline void trim_if(SequenceT&amp; Input, PredicateT IsSpace)</span>
<span class="lineNum">     359 </span>            :         {
<span class="lineNum">     360 </span><span class="lineNoCov">          0 :             ::boost::algorithm::trim_right_if( Input, IsSpace );</span>
<span class="lineNum">     361 </span><span class="lineNoCov">          0 :             ::boost::algorithm::trim_left_if( Input, IsSpace );</span>
<span class="lineNum">     362 </span><span class="lineNoCov">          0 :         }</span>
<span class="lineNum">     363 </span>            : 
<span class="lineNum">     364 </span>            :         //! Trim
<span class="lineNum">     365 </span>            :         /*!
<span class="lineNum">     366 </span>            :             Remove all leading and trailing spaces from the input. 
<span class="lineNum">     367 </span>            :             The input sequence is modified in-place.
<span class="lineNum">     368 </span>            : 
<span class="lineNum">     369 </span>            :             \param Input An input sequence
<span class="lineNum">     370 </span>            :             \param Loc A locale used for 'space' classification
<a name="371"><span class="lineNum">     371 </span>            :         */</a>
<span class="lineNum">     372 </span>            :         template&lt;typename SequenceT&gt;
<span class="lineNum">     373 </span><span class="lineNoCov">          0 :         inline void trim(SequenceT&amp; Input, const std::locale&amp; Loc=std::locale())</span>
<span class="lineNum">     374 </span>            :         {
<span class="lineNum">     375 </span><span class="lineNoCov">          0 :             ::boost::algorithm::trim_if(</span>
<span class="lineNum">     376 </span>            :                 Input, 
<span class="lineNum">     377 </span>            :                 is_space( Loc ) );
<span class="lineNum">     378 </span><span class="lineNoCov">          0 :         }</span>
<span class="lineNum">     379 </span>            : 
<span class="lineNum">     380 </span>            :     } // namespace algorithm 
<span class="lineNum">     381 </span>            : 
<span class="lineNum">     382 </span>            :     // pull names to the boost namespace
<span class="lineNum">     383 </span>            :     using algorithm::trim_left;
<span class="lineNum">     384 </span>            :     using algorithm::trim_left_if;
<span class="lineNum">     385 </span>            :     using algorithm::trim_left_copy;
<span class="lineNum">     386 </span>            :     using algorithm::trim_left_copy_if;
<span class="lineNum">     387 </span>            :     using algorithm::trim_right;
<span class="lineNum">     388 </span>            :     using algorithm::trim_right_if;
<span class="lineNum">     389 </span>            :     using algorithm::trim_right_copy;
<span class="lineNum">     390 </span>            :     using algorithm::trim_right_copy_if;
<span class="lineNum">     391 </span>            :     using algorithm::trim;
<span class="lineNum">     392 </span>            :     using algorithm::trim_if;
<span class="lineNum">     393 </span>            :     using algorithm::trim_copy;
<span class="lineNum">     394 </span>            :     using algorithm::trim_copy_if;
<span class="lineNum">     395 </span>            : 
<span class="lineNum">     396 </span>            : } // namespace boost
<span class="lineNum">     397 </span>            : 
<span class="lineNum">     398 </span>            : #endif  // BOOST_STRING_TRIM_HPP
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.12</a></td></tr>
  </table>
  <br>

</body>
</html>
